/**
    GpsNetwork lets you download files and log some system parameters from NetRs DGPS receivers.

    Copyright (C) 2009  Eduardo Maureira

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

    email:emaureir@gmail.com
 */
package gui;

import java.awt.Component;

import javax.swing.JButton;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;

/**
 * @author Eduardo
 *
 */
public class ValorColorRenderer extends JButton implements TableCellRenderer {

	//private 
	public ValorColorRenderer ()
	{
		//this.valor = valor;
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = -2452596264055263230L;

	@Override
	public Component getTableCellRendererComponent(JTable arg0, Object arg1,
			boolean arg2, boolean arg3, int arg4, int arg5) {
		ValorColor valor;
		valor = (ValorColor) arg1;
		this.setBackground(valor.getStatusColor());
		this.setText(valor.getValor());
		this.setBackground(valor.getStatusColor());
		return this;
	}

}
